#pragma once
#include <json/json.h>
#include <http.hpp>
#include "protocol_tool.h"



void NotFoundHandler(const server_muduo::HttpRequest& req, server_muduo::HttpResponse* rsp)
{
    std::cout << "NotFoundHandler" <<std::endl;
    std::string buf;
    std::string filename = std::string(ROOT_PATH) +"/../web_server/web/error.html";

    int ret = Util::ReadFile(filename, &buf);
    if(ret ==false)
    {
        std::cout << "read file error" <<std::endl;
    }

    std::cout << filename << std::endl;

    std::cout << buf << std::endl;

    
    rsp->SetContent(buf, "text/html");
    rsp->SetStatu(404);

    
}



void UserLogin(const server_muduo::HttpRequest& req, server_muduo::HttpResponse* rsp)
{
    // 暂时不需要热加载


}

void UserRegister(const server_muduo::HttpRequest& req, server_muduo::HttpResponse* rsp)
{

}




void GetGameImages(const server_muduo::HttpRequest& req, server_muduo::HttpResponse* rsp)
{

}


void GetActivityImage(const server_muduo::HttpRequest& req, server_muduo::HttpResponse* rsp)
{

}

void PostGameData(const server_muduo::HttpRequest& req, server_muduo::HttpResponse* rsp)
{

}


void PostActivityImage(const server_muduo::HttpRequest& req, server_muduo::HttpResponse* rsp)
{

}

